﻿/**
 * 
 * @file FITKSpectraFrequencyGenerator.h
 * @brief 频谱频率生成器，根据最大值与最小值对全局数据进行筛选
 * @author LiBaojun (libaojunqd@foxmail.com)
 * @date 2024-11-01
 * 
 */
#ifndef _FITK_SPECTRA_FREQUENCE_GENERATOR_H___
#define _FITK_SPECTRA_FREQUENCE_GENERATOR_H___
 

#include "FITKGlobalFrequencyDomain.h"

namespace Acoustics
{
    /**
     * @brief 频谱频率生成器
     * @author LiBaojun (libaojunqd@foxmail.com)
     * @date 2024-11-01
     */
    class FITKAcousticsPhysicsAPI  FITKSpectraFrequencyGenerator : public Core::FITKAbstractObject
    {
    public:
        /**
         * @brief Construct a new FITKSpectraFrequencyGenerator object
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-11-01
         */
        explicit FITKSpectraFrequencyGenerator() = default;
        /**
         * @brief Destroy the FITKSpectraFrequencyGenerator object
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-11-01
         */
        virtual ~FITKSpectraFrequencyGenerator () = default;
        /**
         * @brief 设置频率范围
         * @param[i]  min            最小值
         * @param[i]  max            最大值
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-11-01
         */
        void setFrequenceRange(const double& min, const double& max);
        /**
         * @brief 设置频率范围类型
         * @param[i]  t              类型
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-11-01
         */
        void setDomainType(FITKGlobalFrequencyDomain::DomainType t);
        /**
         * @brief 设置 Octave 数量
         * @param[i]  n             Octave 数量
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-11-01
         */
        void  setOctaveNum(const int n);
        /**
         * @brief 设置带宽
         * @param[i]  w              带宽
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-31
         */
        void setBandWidth(const double w);
         /**
          * @brief 获取频率列表
          * @return QList<double>   频率列表
          * @author LiBaojun (libaojunqd@foxmail.com)
          * @date 2024-11-01
          */
        QList<double> getFrequencyList();

    private:
         /**
          * @brief 频率范围
          * @author LiBaojun (libaojunqd@foxmail.com)
          * @date 2024-11-01
          */
        double _range[2] = { 0,0 };
        /**
         * @brief 范围类型
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-11-01
         */
        FITKGlobalFrequencyDomain::DomainType _type{ FITKGlobalFrequencyDomain::DomainType::DTNone };
        /**
         * @brief Octave 数量
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-11-01
         */
        int _octaveNum{ 0 };
        /**
         * @brief 带宽
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-11-01
         */
        double _bandWidth{ 0.0 };
    };

    
}


#endif
